<template>
  <div class="home">
    主页
  </div>
</template>

<script>
export default {
  name: 'Home',
  data () {
    return {
      list: []
    }
  },
  created () {
    this.$axios({
      url: "https://api.it120.cc/txd/shop/goods/list",
      method: "post",//请求方式
      data: {
        page: 1,
        pageSize: 10
      }//get 请求用params传参 post请求用data传参
    }).then(res => {
      console.log(res)
      this.list = res.data.data;
    }).catch(err => {
      console.log(err)
    })
  },
  components: {

  }
}
</script>
<style lang="less">
img {
  width: 200px;
  height: 200px;
}
</style>
